<template>
  <div style="height: 100px; border: 1px solid burlywood;">
    <h5>从父组件中拿到的值</h5>
    <p>{{ parent_var }}</p>
  </div>
</template>

<script>
export default {
  name: 'Child',
  inject: ['parent_var']// 得到父组件传递过来的数据
}
</script>

<style scoped>

</style>
